package com.sch.wanandroid.adapter

import android.widget.ImageView
import coil.load
import coil.transform.RoundedCornersTransformation
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.sch.wanandroid.R
import com.sch.wanandroid.entity.GirlEntity

/**
 * Created by Sch.
 * Date: 2020/12/16
 * description:
 */
class GirlsAdapter : BaseQuickAdapter<GirlEntity, BaseViewHolder>(R.layout.item_girl) {
    override fun convert(holder: BaseViewHolder, item: GirlEntity) {
        holder.getView<ImageView>(R.id.iv).load(item.url){
            transformations(RoundedCornersTransformation(20F))
        }
        holder.setText(R.id.tvDesc, item.desc)
    }
}